home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
regmax
/
regform.frm
< prev
next >
Wrap
Text File
|
1995-01-02
|
7KB
|
241 lines
VERSION 2.00
Begin Form REGFORM
BackColor = &H00C0C0C0&
BorderStyle = 3 'Fixed Double
Caption = "Registration Form"
ClientHeight = 2490
ClientLeft = 2580
ClientTop = 4050
ClientWidth = 6780
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 2895
Icon = REGFORM.FRX:0000
Left = 2520
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2490
ScaleWidth = 6780
Top = 3705
Width = 6900
Begin TextBox txt_USERORG
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 360
Left = 1140
TabIndex = 2
TabStop = 0 'False
Text = "Text1"
Top = 1980
Width = 3975
End
Begin TextBox txt_USERNAME
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 360
Left = 1140
TabIndex = 0
TabStop = 0 'False
Text = "Text1"
Top = 1500
Width = 3975
End
Begin CommandButton btn_Cancel
Cancel = -1 'True
Caption = "&Cancel"
Height = 495
Left = 5340
TabIndex = 3
TabStop = 0 'False
Top = 840
Width = 1215
End
Begin CommandButton btn_OK
Caption = "&OK"
Height = 495
Left = 5340
TabIndex = 1
TabStop = 0 'False
Top = 180
Width = 1215
End
Begin Label Label1
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "Organisation:"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 60
TabIndex = 6
Top = 2040
Width = 1035
End
Begin Label lbl_Name
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "Your Name:"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 60
TabIndex = 5
Top = 1560
Width = 1035
End
Begin Label lbl_Title1
Alignment = 2 'Center
BackStyle = 0 'Transparent
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 10.5
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 1155
Left = 180
TabIndex = 4
Top = 180
Width = 4935
End
Begin Image img_Icon
BorderStyle = 1 'Fixed Single
Height = 510
Left = 5700
Picture = REGFORM.FRX:0302
Top = 1620
Width = 510
End
End
Option Explicit
' //General variable//
Dim msg As String
Sub btn_Cancel_Click ()
' /* Modified 31/12/94 [GB] */
' /* Created 31/12/94 [GB] */
USERNAME = "UNLICENSED"
USERORG = "UNLICENSED"
Unload Me
End Sub
Sub btn_OK_Click ()
' /* Modified 31/12/94 [GB] */
' /* Created 31/12/94 [GB] */
USERNAME = txt_USERNAME.Text
USERORG = txt_USERORG.Text
Dim sz_Key As String
' //Only register on valid input//
If USERNAME = "" Or USERORG = "" Then
USERNAME = "Gordon Bamber"
USERORG = "Maxim Training"
End If
If ISVBRUNNING() = 0 Then
sz_Key = InputBox$("Please enter your unique registration code", "REGMAX Registration", "1234567890")
PutDataIntoEXE USERNAME, USERORG, sz_Key
' //Allow once-Only registration//
' //NOTE: this is not required.//
' //Multiple writes to the EXE are OK//
MainForm!btn_WriteRegData.Enabled = False
End If
Unload Me
End Sub
Sub Form_Load ()
' /* Modified 31/12/94 [GB] */
' /* Created 31/12/94 [GB] */
' //Place the form correctly on the screen//
Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2
' //Initialise this form display//
InitFrmVars
' //Form must be visible for SetFocus to work//
Show
txt_USERNAME.SelStart = 0
txt_USERNAME.SelLength = Len(txt_USERNAME.Text)
txt_USERNAME.SetFocus
End Sub
Sub Form_QueryUnload (Cancel As Integer, UnloadMode As Integer)
' /* Modified 31/12/94 [GB] */
' /* Created 31/12/94 [GB] */
MainForm.Show
End Sub
Sub InitFrmVars ()
' /* Modified 31/12/94 [GB] */
' /* Created 31/12/94 [GB] */
msg = "Thank you for purchasing this software. "
msg = msg & "In order to complete the registration details, please type in the following information,"
msg = msg & " and then select OK."
lbl_Title1.Caption = msg
' //Initialise for Text Boxes//
USERNAME = "Gordon Bamber"
USERORG = "Maxim Training"
txt_USERNAME.Text = USERNAME
txt_USERORG.Text = USERORG
End Sub
Sub txt_USERNAME_KeyDown (KeyCode As Integer, Shift As Integer)
' /* Modified 31/12/94 [GB] */
' /* Created 31/12/94 [GB] */
If KeyCode = 13 Or KeyCode = 9 Then
KeyCode = 0
USERNAME = txt_USERNAME.Text
txt_USERORG.SelStart = 0
txt_USERORG.SelLength = Len(txt_USERORG.Text)
txt_USERORG.SetFocus
End If
End Sub
Sub txt_USERORG_KeyDown (KeyCode As Integer, Shift As Integer)
' /* Modified 31/12/94 [GB] */
' /* Created 31/12/94 [GB] */
If KeyCode = 13 Or KeyCode = 9 Then
KeyCode = 0
USERORG = txt_USERORG.Text
Btn_OK.SetFocus
End If
End Sub